<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>pytils.numeral</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="pytils-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

      <th class="navbar" width="100%"></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        <a href="pytils-module.html">Package&nbsp;pytils</a> ::
        Module&nbsp;numeral
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript: void(0);" class="privatelink"
    onclick="toggle_private();">hide private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="pytils.numeral-module.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== MODULE DESCRIPTION ==================== -->
<h1 class="epydoc">Module numeral</h1><span class="codelink"><a href="pytils.numeral-pysrc.html">source&nbsp;code</a></span><br /><br />
Plural forms and in-word representation for numerals.<br /><br />

<!-- ==================== FUNCTIONS ==================== -->
<a name="section-Functions"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Functions</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Functions"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr class="private">
  <td width="15%" align="right" valign="top" class="summary">
    <code class="summary-type"><code>str</code></code>
  </td><td class="summary">
    <span class="summary-sig"><a href="pytils.numeral-module.html#_get_float_remainder" class="summary-sig-name">_get_float_remainder</a>(<span class="summary-sig-arg">fvalue</span>,
        <span class="summary-sig-arg">signs</span>=<span class="summary-sig-default">9</span>)</span><br />
      Get remainder of float, i.e.
  </td>
</tr>
<tr>
  <td width="15%" align="right" valign="top" class="summary">
    <code class="summary-type"><code>unicode</code></code>
  </td><td class="summary">
    <span class="summary-sig"><a href="pytils.numeral-module.html#choose_plural" class="summary-sig-name">choose_plural</a>(<span class="summary-sig-arg">amount</span>,
        <span class="summary-sig-arg">variants</span>)</span><br />
      Choose proper case depending on amount
  </td>
</tr>
<tr>
  <td width="15%" align="right" valign="top" class="summary">
    <code class="summary-type"><code>unicode</code></code>
  </td><td class="summary">
    <span class="summary-sig"><a href="pytils.numeral-module.html#rubles" class="summary-sig-name">rubles</a>(<span class="summary-sig-arg">amount</span>,
        <span class="summary-sig-arg">zero_for_kopeck</span>=<span class="summary-sig-default">False</span>)</span><br />
      Get string for money
  </td>
</tr>
<tr>
  <td width="15%" align="right" valign="top" class="summary">
    <code class="summary-type"><code>unicode</code></code>
  </td><td class="summary">
    <span class="summary-sig"><a href="pytils.numeral-module.html#in_words_int" class="summary-sig-name">in_words_int</a>(<span class="summary-sig-arg">amount</span>,
        <span class="summary-sig-arg">gender</span>=<span class="summary-sig-default">1</span>)</span><br />
      Integer in words
  </td>
</tr>
<tr>
  <td width="15%" align="right" valign="top" class="summary">
    <code class="summary-type"><code>unicode</code></code>
  </td><td class="summary">
    <span class="summary-sig"><a href="pytils.numeral-module.html#in_words_float" class="summary-sig-name">in_words_float</a>(<span class="summary-sig-arg">amount</span>,
        <span class="summary-sig-arg">_gender</span>=<span class="summary-sig-default">2</span>)</span><br />
      Float in words
  </td>
</tr>
<tr>
  <td width="15%" align="right" valign="top" class="summary">
    <code class="summary-type"><p><code>unicode</code></p>
      raise TypeError: when amount not <code>int</code> or 
      <code>float</code> raise ValueError: when amount is negative raise 
      TypeError: when gender is not <code>int</code> (and not None) raise 
      ValueError: if gender isn't in (1,2,3)</code>
  </td><td class="summary">
    <span class="summary-sig"><a href="pytils.numeral-module.html#in_words" class="summary-sig-name">in_words</a>(<span class="summary-sig-arg">amount</span>,
        <span class="summary-sig-arg">gender</span>=<span class="summary-sig-default">None</span>)</span><br />
      Numeral in words
  </td>
</tr>
<tr>
  <td width="15%" align="right" valign="top" class="summary">
    <code class="summary-type"><code>unicode</code></code>
  </td><td class="summary">
    <span class="summary-sig"><a href="pytils.numeral-module.html#sum_string" class="summary-sig-name">sum_string</a>(<span class="summary-sig-arg">amount</span>,
        <span class="summary-sig-arg">gender</span>,
        <span class="summary-sig-arg">items</span>=<span class="summary-sig-default">None</span>)</span><br />
      Get sum in words
  </td>
</tr>
<tr class="private">
  <td width="15%" align="right" valign="top" class="summary">
    <code class="summary-type"><code>tuple</code></code>
  </td><td class="summary">
    <span class="summary-sig"><a href="pytils.numeral-module.html#_sum_string_fn" class="summary-sig-name">_sum_string_fn</a>(<span class="summary-sig-arg">into</span>,
        <span class="summary-sig-arg">tmp_val</span>,
        <span class="summary-sig-arg">gender</span>,
        <span class="summary-sig-arg">items</span>=<span class="summary-sig-default">None</span>)</span><br />
      Make in-words representation of single order
  </td>
</tr>
</table>

<br />
<!-- ==================== VARIABLES ==================== -->
<a name="section-Variables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Variables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
  <td width="15%" align="right" valign="top" class="summary">
    <code class="summary-type">&nbsp;</code>
  </td><td class="summary">
    <a href="pytils.numeral-module.html#__revision__">__revision__</a> = <code title="'$Id: numeral.py 29 2006-10-21 08:28:27Z the.pythy $'">'$Id: numeral.py 29 2006-10-21 08:28:27Z the.pythy $'</code>
  </td>
</tr>
<tr>
  <td width="15%" align="right" valign="top" class="summary">
    <code class="summary-type">&nbsp;</code>
  </td><td class="summary">
    <a href="pytils.numeral-module.html#__id__">__id__</a> = <code title="'$Id: numeral.py 29 2006-10-21 08:28:27Z the.pythy $'">'$Id: numeral.py 29 2006-10-21 08:28:27Z the.pythy $'</code>
  </td>
</tr>
<tr>
  <td width="15%" align="right" valign="top" class="summary">
    <code class="summary-type">&nbsp;</code>
  </td><td class="summary">
    <a href="pytils.numeral-module.html#__url__">__url__</a> = <code title="'$URL: https://pythy.googlecode.com/svn/trunk/pytils/pytils/numeral.py $'">'$URL: https://pythy.googlecode.com/svn/trunk/pytils...</code>
  </td>
</tr>
<tr>
  <td width="15%" align="right" valign="top" class="summary">
    <code class="summary-type">&nbsp;</code>
  </td><td class="summary">
    <a href="pytils.numeral-module.html#FRACTIONS">FRACTIONS</a> = <code title="((u'\u0434\u0435\u0441\u044f\u0442\u0430\u044f', u'\u0434\u0435\u0441\u044f\u0442\u044b\u0445', u'\u0434\u0435\u0441\u044f\u0442\u044b\u0445'), (u'\u0441\u043e\u0442\u0430\u044f', u'\u0441\u043e\u0442\u044b\u0445', u'\u0441\u043e\u0442\u044b\u0445'), (u'\u0442\u044b\u0441\u044f\u0447\u043d\u0430\u044f', u'\u0442\u044b\u0441\u044f\u0447\u043d\u044b\u0445', u'\u0442\u044b\u0441\u044f\u0447\u043d\u044b\u0445'), (u'\u0434\u0435\u0441\u044f\u0442\u0438\u0442\u044b\u0441\u044f\u0447\u043d\u0430\u044f', u'\u0434\u0435\u0441\u044f\u0442\u0438\u0442\u044b\u0441\u044f\u0447\u043d\u044b\u0445', u'\u04...">((u'\u0434\u0435\u0441\u044f\u0442\u0430\u044f', u'\...</code><br />
      Forms (1, 2, 5) for fractions
  </td>
</tr>
<tr>
  <td width="15%" align="right" valign="top" class="summary">
    <code class="summary-type">&nbsp;</code>
  </td><td class="summary">
    <a href="pytils.numeral-module.html#ONES">ONES</a> = <code title="{0: (u'', u'', u''), 1: (u'\u043e\u0434\u0438\u043d', u'\u043e\u0434\u043d\u0430', u'\u043e\u0434\u043d\u043e'), 2: (u'\u0434\u0432\u0430', u'\u0434\u0432\u0435', u'\u0434\u0432\u0430'), 3: (u'\u0442\u0440\u0438', u'\u0442\u0440\u0438', u'\u0442\u0440\u0438'), 4: (u'\u0447\u0435\u0442\u044b\u0440\u0435', u'\u0447\u0435\u0442\u044b\u0440\u0435', u'\u0447\u0435\u0442\u044b\u0440\u0435'), 5: (u'\u043f\u044f\u0442\u044c', u'\u043f\u044f\u0442\u044c', u'\u043f\u044f\u0442\u044c'), 6: (u'\u0448\u0435\u0441\u0442\u044c', u'\u0448\u0435\u0441\u0442\u044c', u'\u0448\u0435\u0441\u0442\u044c'), 7: (u'...">{0: (u'', u'', u''), 1: (u'\u043e\u0434\u0438\u043d'...</code><br />
      Forms (1, 2, 5) for ones
  </td>
</tr>
<tr>
  <td width="15%" align="right" valign="top" class="summary">
    <code class="summary-type">&nbsp;</code>
  </td><td class="summary">
    <a href="pytils.numeral-module.html#TENS">TENS</a> = <code title="{0: u'', 2: u'\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044c', 3: u'\u0442\u0440\u0438\u0434\u0446\u0430\u0442\u044c', 4: u'\u0441\u043e\u0440\u043e\u043a', 5: u'\u043f\u044f\u0442\u044c\u0434\u0435\u0441\u044f\u0442', 6: u'\u0448\u0435\u0441\u0442\u044c\u0434\u0435\u0441\u044f\u0442', 7: u'\u0441\u0435\u043c\u044c\u0434\u0435\u0441\u044f\u0442', 8: u'\u0432\u043e\u0441\u0435\u043c\u044c\u0434\u0435\u0441\u044f\u0442', 9: u'\u0434\u0435\u0432\u044f\u043d\u043e\u0441\u0442\u043e', 10: u'\u0434\u0435\u0441\u044f\u0442\u044c', 11: u'\u043e\u0434\u0438\u043d\u043d\u0430\u0434\u0446\u0430\u044...">{0: u'', 2: u'\u0434\u0432\u0430\u0434\u0446\u0430\u...</code><br />
      Tens
  </td>
</tr>
<tr>
  <td width="15%" align="right" valign="top" class="summary">
    <code class="summary-type">&nbsp;</code>
  </td><td class="summary">
    <a href="pytils.numeral-module.html#HUNDREDS">HUNDREDS</a> = <code title="{0: u'', 1: u'\u0441\u0442\u043e', 2: u'\u0434\u0432\u0435\u0441\u0442\u0438', 3: u'\u0442\u0440\u0438\u0441\u0442\u0430', 4: u'\u0447\u0435\u0442\u044b\u0440\u0435\u0441\u0442\u0430', 5: u'\u043f\u044f\u0442\u044c\u0441\u043e\u0442', 6: u'\u0448\u0435\u0441\u0442\u044c\u0441\u043e\u0442', 7: u'\u0441\u0435\u043c\u044c\u0441\u043e\u0442', 8: u'\u0432\u043e\u0441\u0435\u043c\u044c\u0441\u043e\u0442', 9: u'\u0434\u0435\u0432\u044f\u0442\u044c\u0441\u043e\u0442'}">{0: u'', 1: u'\u0441\u0442\u043e', 2: u'\u0434\u0432...</code><br />
      Hundreds
  </td>
</tr>
</table>

<br />
<!-- ==================== FUNCTION DETAILS ==================== -->
<a name="section-FunctionDetails"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Function Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-FunctionDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="_get_float_remainder"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">_get_float_remainder</span>(<span class="sig-arg">fvalue</span>,
        <span class="sig-arg">signs</span>=<span class="sig-default">9</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="pytils.numeral-pysrc.html#_get_float_remainder">source&nbsp;code</a></span>&nbsp;</span
    ></td>
  </table>
  
  Get remainder of float, i.e. 2.05 -&gt; '05'
  <dl><dt></dt><dd>
    <dl><dt>Parameters:</dt></dl>
    <ul class="nomargin">
        <li><strong class="pname"><code>fvalue</code></strong> (<code><code>int</code> or <code>float</code></code>) - input value</li>
        <li><strong class="pname"><code>signs</code></strong> (<code><code>int</code></code>) - maximum number of signs</li>
    </ul>
    <dl><dt>Returns: <code><code>str</code></code></dt>
        <dd>remainder</dd></dl>
    <dl><dt>Raises:</dt></dl>
    <ul class="nomargin">
        <li><code><strong class='fraise'>TypeError</strong></code> - fvalue neither <code>int</code>, no <code>float</code></li>
        <li><code><strong class='fraise'>ValueError</strong></code> - fvalue is negative</li>
        <li><code><strong class='fraise'>ValueError</strong></code> - signs overflow</li>
    </ul>
  </dd></dl>
</td></tr></table>
</div>
<a name="choose_plural"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">choose_plural</span>(<span class="sig-arg">amount</span>,
        <span class="sig-arg">variants</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="pytils.numeral-pysrc.html#choose_plural">source&nbsp;code</a></span>&nbsp;</span
    ></td>
  </table>
  
  Choose proper case depending on amount
  <dl><dt></dt><dd>
    <dl><dt>Parameters:</dt></dl>
    <ul class="nomargin">
        <li><strong class="pname"><code>amount</code></strong> (<code><code>int</code></code>) - amount of objects</li>
        <li><strong class="pname"><code>variants</code></strong> (<code>3-element <code>sequence</code> of <code>unicode</code> or 
          <code>unicode</code> (three variants with delimeter ',')</code>) - variants (forms) of object in such form: (1 object, 2 objects,
          5 objects).</li>
    </ul>
    <dl><dt>Returns: <code><code>unicode</code></code></dt>
        <dd>proper variant</dd></dl>
    <dl><dt>Raises:</dt></dl>
    <ul class="nomargin">
        <li><code><strong class='fraise'>TypeError</strong></code> - amount isn't <code>int</code>, variants isn't 
        <code>sequence</code></li>
        <li><code><strong class='fraise'>ValueError</strong></code> - amount is negative</li>
        <li><code><strong class='fraise'>ValueError</strong></code> - variants' length lesser than 3</li>
    </ul>
  </dd></dl>
</td></tr></table>
</div>
<a name="rubles"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">rubles</span>(<span class="sig-arg">amount</span>,
        <span class="sig-arg">zero_for_kopeck</span>=<span class="sig-default">False</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="pytils.numeral-pysrc.html#rubles">source&nbsp;code</a></span>&nbsp;</span
    ></td>
  </table>
  
  Get string for money
  <dl><dt></dt><dd>
    <dl><dt>Parameters:</dt></dl>
    <ul class="nomargin">
        <li><strong class="pname"><code>amount</code></strong> (<code><code>int</code> or <code>float</code></code>) - amount of money</li>
        <li><strong class="pname"><code>zero_for_kopeck</code></strong> (<code><code>bool</code></code>) - If false, then zero kopecks ignored</li>
    </ul>
    <dl><dt>Returns: <code><code>unicode</code></code></dt>
        <dd>in-words representation of money's amount</dd></dl>
    <dl><dt>Raises:</dt></dl>
    <ul class="nomargin">
        <li><code><strong class='fraise'>TypeError</strong></code> - amount neither <code>int</code>, no <code>float</code></li>
        <li><code><strong class='fraise'>ValueError</strong></code> - amount is negative</li>
    </ul>
  </dd></dl>
</td></tr></table>
</div>
<a name="in_words_int"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">in_words_int</span>(<span class="sig-arg">amount</span>,
        <span class="sig-arg">gender</span>=<span class="sig-default">1</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="pytils.numeral-pysrc.html#in_words_int">source&nbsp;code</a></span>&nbsp;</span
    ></td>
  </table>
  
  Integer in words
  <dl><dt></dt><dd>
    <dl><dt>Parameters:</dt></dl>
    <ul class="nomargin">
        <li><strong class="pname"><code>amount</code></strong> (<code><code>int</code></code>) - numeral</li>
        <li><strong class="pname"><code>gender</code></strong> (<code><code>int</code></code>) - gender (male=1, female=2, neuter=3)</li>
    </ul>
    <dl><dt>Returns: <code><code>unicode</code></code></dt>
        <dd>in-words reprsentation of numeral</dd></dl>
    <dl><dt>Raises:</dt></dl>
    <ul class="nomargin">
        <li><code><strong class='fraise'>TypeError</strong></code> - when amount is not <code>int</code></li>
        <li><code><strong class='fraise'>ValueError</strong></code> - amount is negative</li>
    </ul>
  </dd></dl>
</td></tr></table>
</div>
<a name="in_words_float"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">in_words_float</span>(<span class="sig-arg">amount</span>,
        <span class="sig-arg">_gender</span>=<span class="sig-default">2</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="pytils.numeral-pysrc.html#in_words_float">source&nbsp;code</a></span>&nbsp;</span
    ></td>
  </table>
  
  Float in words
  <dl><dt></dt><dd>
    <dl><dt>Parameters:</dt></dl>
    <ul class="nomargin">
        <li><strong class="pname"><code>amount</code></strong> (<code><code>float</code></code>) - float numeral</li>
    </ul>
    <dl><dt>Returns: <code><code>unicode</code></code></dt>
        <dd>in-words reprsentation of float numeral</dd></dl>
    <dl><dt>Raises:</dt></dl>
    <ul class="nomargin">
        <li><code><strong class='fraise'>TypeError</strong></code> - when amount is not <code>float</code></li>
        <li><code><strong class='fraise'>ValueError</strong></code> - when ammount is negative</li>
    </ul>
  </dd></dl>
</td></tr></table>
</div>
<a name="in_words"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">in_words</span>(<span class="sig-arg">amount</span>,
        <span class="sig-arg">gender</span>=<span class="sig-default">None</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="pytils.numeral-pysrc.html#in_words">source&nbsp;code</a></span>&nbsp;</span
    ></td>
  </table>
  
  Numeral in words
  <dl><dt></dt><dd>
    <dl><dt>Parameters:</dt></dl>
    <ul class="nomargin">
        <li><strong class="pname"><code>amount</code></strong> (<code><code>int</code> or <code>float</code></code>) - numeral</li>
        <li><strong class="pname"><code>gender</code></strong> (<code><code>int</code></code>) - gender (male=1, female=2, neuter=3)</li>
    </ul>
    <dl><dt>Returns: <code><p><code>unicode</code></p>
      raise TypeError: when amount not <code>int</code> or 
      <code>float</code> raise ValueError: when amount is negative raise 
      TypeError: when gender is not <code>int</code> (and not None) raise 
      ValueError: if gender isn't in (1,2,3)</code></dt>
        <dd>in-words reprsentation of numeral</dd></dl>
  </dd></dl>
</td></tr></table>
</div>
<a name="sum_string"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">sum_string</span>(<span class="sig-arg">amount</span>,
        <span class="sig-arg">gender</span>,
        <span class="sig-arg">items</span>=<span class="sig-default">None</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="pytils.numeral-pysrc.html#sum_string">source&nbsp;code</a></span>&nbsp;</span
    ></td>
  </table>
  
  Get sum in words
  <dl><dt></dt><dd>
    <dl><dt>Parameters:</dt></dl>
    <ul class="nomargin">
        <li><strong class="pname"><code>amount</code></strong> (<code><code>int</code></code>) - amount of objects</li>
        <li><strong class="pname"><code>gender</code></strong> (<code><code>int</code></code>) - gender of object (male=1, female=2, neuter=3)</li>
        <li><strong class="pname"><code>items</code></strong> (<code>3-element <code>sequence</code> of <code>unicode</code> or 
          just <code>unicode</code> (three variants with delimeter ',')</code>) - variants of object in three forms: for one object, for two 
          objects and for five objects</li>
    </ul>
    <dl><dt>Returns: <code><code>unicode</code></code></dt>
        <dd>in-words representation objects' amount</dd></dl>
    <dl><dt>Raises:</dt></dl>
    <ul class="nomargin">
        <li><code><strong class='fraise'>TypeError</strong></code> - input parameters' check failed</li>
        <li><code><strong class='fraise'>ValueError</strong></code> - items isn't 3-element <code>sequence</code></li>
        <li><code><strong class='fraise'>ValueError</strong></code> - amount bigger than 10**11</li>
        <li><code><strong class='fraise'>ValueError</strong></code> - amount is negative</li>
    </ul>
  </dd></dl>
</td></tr></table>
</div>
<a name="_sum_string_fn"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">_sum_string_fn</span>(<span class="sig-arg">into</span>,
        <span class="sig-arg">tmp_val</span>,
        <span class="sig-arg">gender</span>,
        <span class="sig-arg">items</span>=<span class="sig-default">None</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="pytils.numeral-pysrc.html#_sum_string_fn">source&nbsp;code</a></span>&nbsp;</span
    ></td>
  </table>
  
  Make in-words representation of single order
  <dl><dt></dt><dd>
    <dl><dt>Parameters:</dt></dl>
    <ul class="nomargin">
        <li><strong class="pname"><code>into</code></strong> (<code><code>unicode</code></code>) - in-words representation of lower orders</li>
        <li><strong class="pname"><code>tmp_val</code></strong> (<code><code>int</code></code>) - temporary value without lower orders</li>
        <li><strong class="pname"><code>gender</code></strong> (<code><code>int</code></code>) - gender (male=1, female=2, neuter=3)</li>
        <li><strong class="pname"><code>items</code></strong> (<code>3-element <code>sequence</code> of <code>unicode</code></code>) - variants of objects</li>
    </ul>
    <dl><dt>Returns: <code><code>tuple</code></code></dt>
        <dd>new into and tmp_val</dd></dl>
    <dl><dt>Raises:</dt></dl>
    <ul class="nomargin">
        <li><code><strong class='fraise'>TypeError</strong></code> - input parameters' check failed</li>
        <li><code><strong class='fraise'>ValueError</strong></code> - tmp_val is negative</li>
    </ul>
  </dd></dl>
</td></tr></table>
</div>
<br />
<!-- ==================== VARIABLES DETAILS ==================== -->
<a name="section-VariablesDetails"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Variables Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-VariablesDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__revision__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">__revision__</h3>
  None
  <dl><dt></dt><dd>
    <dl><dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
<span class="variable-quote">'</span>$Id: numeral.py 29 2006-10-21 08:28:27Z the.pythy $<span class="variable-quote">'</span>                  
      </pre></td></tr></table></dd>
    </dl>
  </dd></dl>
</td></tr></table>
</div>
<a name="__id__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">__id__</h3>
  None
  <dl><dt></dt><dd>
    <dl><dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
<span class="variable-quote">'</span>$Id: numeral.py 29 2006-10-21 08:28:27Z the.pythy $<span class="variable-quote">'</span>                  
      </pre></td></tr></table></dd>
    </dl>
  </dd></dl>
</td></tr></table>
</div>
<a name="__url__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">__url__</h3>
  None
  <dl><dt></dt><dd>
    <dl><dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
<span class="variable-quote">'</span>$URL: https://pythy.googlecode.com/svn/trunk/pytils/pytils/numeral.py<span class="variable-linewrap"><img src="crarr.png" alt="" /></span>
 $<span class="variable-quote">'</span>                                                                    
      </pre></td></tr></table></dd>
    </dl>
  </dd></dl>
</td></tr></table>
</div>
<a name="FRACTIONS"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">FRACTIONS</h3>
  Forms (1, 2, 5) for fractions
  <dl><dt></dt><dd>
    <dl><dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
((u'\u0434\u0435\u0441\u044f\u0442\u0430\u044f',
  u'\u0434\u0435\u0441\u044f\u0442\u044b\u0445',
  u'\u0434\u0435\u0441\u044f\u0442\u044b\u0445'),
 (u'\u0441\u043e\u0442\u0430\u044f',
  u'\u0441\u043e\u0442\u044b\u0445',
  u'\u0441\u043e\u0442\u044b\u0445'),
 (u'\u0442\u044b\u0441\u044f\u0447\u043d\u0430\u044f',
  u'\u0442\u044b\u0441\u044f\u0447\u043d\u044b\u0445',
<span class="variable-ellipsis">...</span>                                                                    
      </pre></td></tr></table></dd>
    </dl>
  </dd></dl>
</td></tr></table>
</div>
<a name="ONES"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">ONES</h3>
  Forms (1, 2, 5) for ones
  <dl><dt></dt><dd>
    <dl><dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
{0: (u'', u'', u''),
 1: (u'\u043e\u0434\u0438\u043d',
     u'\u043e\u0434\u043d\u0430',
     u'\u043e\u0434\u043d\u043e'),
 2: (u'\u0434\u0432\u0430', u'\u0434\u0432\u0435', u'\u0434\u0432\u043<span class="variable-linewrap"><img src="crarr.png" alt="" /></span>
0'),
 3: (u'\u0442\u0440\u0438', u'\u0442\u0440\u0438', u'\u0442\u0440\u043<span class="variable-linewrap"><img src="crarr.png" alt="" /></span>
8'),
<span class="variable-ellipsis">...</span>                                                                    
      </pre></td></tr></table></dd>
    </dl>
  </dd></dl>
</td></tr></table>
</div>
<a name="TENS"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">TENS</h3>
  Tens
  <dl><dt></dt><dd>
    <dl><dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
{0: u'',
 2: u'\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044c',
 3: u'\u0442\u0440\u0438\u0434\u0446\u0430\u0442\u044c',
 4: u'\u0441\u043e\u0440\u043e\u043a',
 5: u'\u043f\u044f\u0442\u044c\u0434\u0435\u0441\u044f\u0442',
 6: u'\u0448\u0435\u0441\u0442\u044c\u0434\u0435\u0441\u044f\u0442',
 7: u'\u0441\u0435\u043c\u044c\u0434\u0435\u0441\u044f\u0442',
 8: u'\u0432\u043e\u0441\u0435\u043c\u044c\u0434\u0435\u0441\u044f\u04<span class="variable-linewrap"><img src="crarr.png" alt="" /></span>
<span class="variable-ellipsis">...</span>                                                                    
      </pre></td></tr></table></dd>
    </dl>
  </dd></dl>
</td></tr></table>
</div>
<a name="HUNDREDS"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">HUNDREDS</h3>
  Hundreds
  <dl><dt></dt><dd>
    <dl><dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
{0: u'',
 1: u'\u0441\u0442\u043e',
 2: u'\u0434\u0432\u0435\u0441\u0442\u0438',
 3: u'\u0442\u0440\u0438\u0441\u0442\u0430',
 4: u'\u0447\u0435\u0442\u044b\u0440\u0435\u0441\u0442\u0430',
 5: u'\u043f\u044f\u0442\u044c\u0441\u043e\u0442',
 6: u'\u0448\u0435\u0441\u0442\u044c\u0441\u043e\u0442',
 7: u'\u0441\u0435\u043c\u044c\u0441\u043e\u0442',
<span class="variable-ellipsis">...</span>                                                                    
      </pre></td></tr></table></dd>
    </dl>
  </dd></dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="pytils-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

      <th class="navbar" width="100%"></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">Generated by Epydoc
        3.0alpha3 on Sun Oct 29 00:35:02 2006</td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>
